<?php
namespace Home\Model;

use Think\Model;

	class columnModel{

		public $_table = 'news';

		function findAll_orderby_dateline(){
			//$sql = 'select * from '.$this->_table.' order by dateline desc';
			$data = M('column')->select();
			return $data;
		}

		function findOne_by_id($id){
			echo $id;
			$where="`id`=".$id;
			$data = M('column')->where($where)->select();
			var_dump($data);
			return $data;
		}

		function del_by_id($id){
			return M ( 'column' )->delete ( $id );;
		}

		function count(){
			return M('column')->count();
		}
	}
?>